package com.boonya.spring.beans;

import java.beans.PropertyEditorSupport;
import java.util.Date;

/**
 * @ClassName: DateEditor
 * @Description: TODO(功能说明 : 自定义日期属性格式化编辑器)
 * @author: pengjunlin
 * @motto: 学习需要毅力，那就秀毅力
 * @date 2021/3/28 10:00
 */
public class DateEditor extends PropertyEditorSupport {

    @Override
    public void setAsText(String text) throws IllegalArgumentException {
        Date date = new Date(text);
        setValue(date);
    }
}
